﻿using DJLang;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace BlockOS.Client.Res
{
    public class BlockModelDefVariant
    {
        public string targetName;
        public DJList bindPoints;
        public BlockModelDefVariant(string targetDefName, DJList bindPoints)
        {
            targetName = targetDefName;
            this.bindPoints = bindPoints;
        }

        public BlockModelDef Produce(BlockModelDef def)
        {
            var ans = (BlockModelDef)def.Clone();

            while (bindPoints.Count > 0)
            {
                ans.bindPoints.Push(bindPoints.Pop());
            }

            return ans;
        }
    }
}
